package com.kitking.surfacevie;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

public class MainActivity extends Activity {

    private DrawSurFaceView drawSurFaceView;
    public static int PenStatus = 1;
    public float i = 0.85f;
    private TextView textView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_main);
        textView = (TextView)findViewById(R.id.text);
        drawSurFaceView=findViewById(R.id.drawSurFaceView);

    }

    public void small(View view) {
        i = i-0.1f;

        textView.setText("value:"+(float)(Math.round(i*100))/100);
    }
    public void large(View view) {
        i = i+0.1f;

        textView.setText("value:"+(float)(Math.round(i*100))/100);
    }
//    public void change(View view) {
//        drawSurFaceView.changeType();
//    }

    public void eraser(View view) {
        drawSurFaceView.eraserType();
    }
}